package com.llkj.qingnianguoxue.http;

import android.content.Context;
import android.util.Log;

import com.llkj.qingnianguoxue.base.ConstantUserInfo;
import com.llkj.qingnianguoxue.base.MyApplication;
import com.llkj.qingnianguoxue.util.StringUtils;
import com.llkj.qingnianguoxue.util.ToastUtil;
import com.orhanobut.logger.Logger;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.builder.PostFormBuilder;
import com.zhy.http.okhttp.callback.StringCallback;

import java.io.File;
import java.util.HashMap;
import java.util.List;

import okhttp3.Call;

/**
 * 如果参数少于3个就直接传入value，如果多于3个就直接出入map
 */
public class HttpMethod {
    //
    private static final String ROOT_URL = "http://app.getfan.cn/index.php?s=Home/";
    public static final String PRE_PIC = "http://app.getfan.cn/Uploads/";
//    private static final String CLASS_ROOM_SETTING_ROOT_URL = "http://qcgx.baidu11.com/index.php?s=/Home/";
    public static final String YOUR_URL = "http://app.getfan.cn/pay.php";
    public static final int HTTP_YOUR_URL = 101111;

    /**
     * 1.1引导页
     */
    public static final String LOGIN_BOOT_PAGE = ROOT_URL + "Login/boot_page";
    public static final int HTTP_LOGIN_BOOT_PAGE = 100000;

    public static void bootPage(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        HashMap<String, String> params = new HashMap<>();
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, LOGIN_BOOT_PAGE, params, callback, HTTP_LOGIN_BOOT_PAGE);
    }

    /**
     * 1.1 注册
     */
    public static final String LOGIN_REGISTER = ROOT_URL + "Login/register";
    public static final int HTTP_LOGIN_REGISTER = 100011;

    public static void loginRegister(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String mobile, String code, String password, String integral) {
        HashMap<String, String> params = new HashMap<>();
        params.put("mobile", mobile);
        params.put("code", code);
        params.put("password", password);

        if (!StringUtils.isEmpty(integral)) {
            params.put("integral", integral);
        }
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, LOGIN_REGISTER, params, callback, HTTP_LOGIN_REGISTER);
    }

    /**
     * 1.2 登录
     */
    public static final String LOGIN_LOGIN = ROOT_URL + "Login/login";
    public static final int HTTP_LOGIN_LOGIN = 100012;

    /**
     * 1.2 登录
     *
     * @param mContext
     * @param callback
     * @param identityType
     * @param mobile   电话(type = 1 必传)
     * @param code 密码
     * @param type     1 电话 2 微信 3 QQ 4 微博
     * @param username QQ微信用户名
     * @param userpic  QQ微信图像
     * @param w_id     第三方返回ID
     */
    public static void loginLogin(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String identityType,
                                  String mobile, String code, String type, String username, String userpic, String w_id,String recommend) {
        HashMap<String, String> params = new HashMap<>();
        params.put("type", type);
        params.put("genre", identityType);
        if ("1".equals(type)) {
            params.put("mobile", mobile);
            params.put("code", code);
        } else {
            params.put("username", username);
            params.put("userpic", userpic);
            params.put("w_id", w_id);
        }
        if(!StringUtils.isEmpty(recommend)){
            params.put("recommend", recommend);
        }
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, LOGIN_LOGIN, params, callback, HTTP_LOGIN_LOGIN);
    }

    /**
     * 1.3发送验证码
     */
    public static final String LOGIN_FORMCODE = ROOT_URL + "Login/formcode";
    public static final int HTTP_LOGIN_FORMCODE = 100013;

    /**
     * @param mContext
     * @param callback
     * @param mobile
     * @param type   1 登录 其他待定
     */
    public static void loginFormcode(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String mobile, String type) {
        HashMap<String, String> params = new HashMap<>();
        params.put("mobile", mobile);
        if(!StringUtils.isEmpty(type)){
            params.put("type", type);
        }
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, LOGIN_FORMCODE, params, callback, HTTP_LOGIN_FORMCODE);
    }

    /**
     * 1.4注册协议
     */
    public static final String LOGIN_REGISTERATION_PROTOCOL = ROOT_URL + "Login/registration_protocol";

    /**
     * 课程设置
     */
    public static final String CLASS_ROOM_SETTING = ROOT_URL + "User/master_curriculum";
    /**
     * 1.5忘记密码
     */
    public static final String LOGIN_FIND_PASSWORD = ROOT_URL + "Login/find_password";
    public static final int HTTP_LOGIN_FIND_PASSWORD = 100015;

    public static void findPassword(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String mobile, String code, String password) {
        HashMap<String, String> params = new HashMap<>();
        params.put("mobile", mobile);
        params.put("code", code);
        params.put("password", password);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, LOGIN_FIND_PASSWORD, params, callback, HTTP_LOGIN_FIND_PASSWORD);
    }

    /**
     * 2.1首页
     */
    public static final String HOMEPAGE_INDEXLIST = ROOT_URL + "Index/index";
    public static final int HTTP_HOMEPAGE_INDEXLIST = 100021;

    public static void indexList(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, HOMEPAGE_INDEXLIST, params, callback, HTTP_HOMEPAGE_INDEXLIST);
    }

    /**
     * 2.2 猜你喜欢换一换
     */
    public static final String INDEX_LIKE_VIDEO = ROOT_URL + "Index/like_video";
    public static final int HTTP_INDEX_LIKE_VIDEO = 100022;

    public static void indexLikeVideo(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String video_sort) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("video_sort", video_sort);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_LIKE_VIDEO, params, callback, HTTP_INDEX_LIKE_VIDEO);
    }

    /**
     * 2.2 猜你喜欢换一换
     */
    public static final String INDEX_LIKE_BOOKS = ROOT_URL + "Index/like_books";
    public static final int HTTP_INDEX_LIKE_BOOKS = 100122;

    public static void indexLikeBooks(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String books_sort) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("video_sort", books_sort);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_LIKE_BOOKS, params, callback, HTTP_INDEX_LIKE_BOOKS);
    }

    /**
     * 2.3 用户签到
     */
    public static final String INDEX_SIGN_IN = ROOT_URL + "Index/sign_in";
    public static final int HTTP_INDEX_SIGN_IN = 100023;

    public static void indexSignIn(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        if(!StringUtils.isEmpty(uid)){
            HashMap<String, String> params = new HashMap<>();
            params.put("uid", uid);
            params.put("token", token);

            AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_SIGN_IN, params, callback, HTTP_INDEX_SIGN_IN);
        }
    }
    /**
     * 2.3 用户签到
     */
    public static final String INDEX_REGISTER = ROOT_URL + "Index/register";
    public static final int HTTP_INDEX_REGISTER = 1000231;

    public static void indexRegister(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        if(!StringUtils.isEmpty(uid)){
            HashMap<String, String> params = new HashMap<>();
            params.put("uid", uid);
            params.put("token", token);

            AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_REGISTER, params, callback, HTTP_INDEX_REGISTER);
        }
    }
    /**
     * 2.4 热门排行视频
     */
    public static final String INDEX_HOT_VIDEO = ROOT_URL + "Index/hot_video";
    public static final int HTTP_INDEX_HOT_VIDEO = 100024;

    public static void hotVideo(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_HOT_VIDEO, params, callback, HTTP_INDEX_HOT_VIDEO);
    }

    /**
     * 2.5.热门图书
     */
    public static final String INDEX_HOT_BOOKS = ROOT_URL + "Index/hot_books";
    public static final int HTTP_INDEX_HOT_BOOKS = 100025;

    public static void hotBooks(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_HOT_BOOKS, params, callback, HTTP_INDEX_HOT_BOOKS);
    }

    /**
     * 2.6搜索页面
     */
    public static final String INDEX_SEARCH = ROOT_URL + "Index/search";
    public static final int HTTP_INDEX_SEARCH = 100026;

    public static void indexSearch(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = null;
        if (!StringUtils.isEmpty(uid)) {
            params = new HashMap<>();
            params.put("uid", uid);
            params.put("token", token);
        }

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_SEARCH, params, callback, HTTP_INDEX_SEARCH);
    }

    /**
     * 2.7提交搜索
     */
    public static final String INDEX_PUT_SEARCH = ROOT_URL + "index/put_search";
    public static final int HTTP_INDEX_PUT_SEARCH = 100027;

    public static void searchResult(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String search, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("search", search);
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_PUT_SEARCH, params, callback, HTTP_INDEX_PUT_SEARCH);
    }

    /**
     * 3.1 往期活动列表
     */
    public static final String ACTIVITY_INDEX = ROOT_URL + "Activity/index";
    public static final int HTTP_ACTIVITY_INDEX = 100031;

    public static void activityIndex(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ACTIVITY_INDEX, params, callback, HTTP_ACTIVITY_INDEX);
    }


    public static final String ACTIVITY_DETAILS = ROOT_URL + "Activity/details";
    public static final int HTTP_ACTIVITY_DETAILS = 100032;

    /**
     * 3.2活动详情
     *
     * @param mContext
     * @param callback
     * @param id       新闻的id
     */
    public static void activityDetail(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ACTIVITY_DETAILS, params, callback, HTTP_ACTIVITY_DETAILS);
    }


    public static final String ACTIVITY_APPLY = ROOT_URL + "Activity/apply";
    public static final int HTTP_ACTIVITY_APPLY = 100033;

    /**
     * 3.3.参加活动
     *
     * @param mContext
     * @param callback
     * @param aid      活动的id
     * @param name     报名人姓名
     * @param mobile   报名人电话
     * @param email    邮箱
     * @param remark   备注
     */
    public static void activityApply(Context mContext, AnsynHttpRequest.ObserverCallBack callback
            , String aid, String name, String mobile, String email, String remark) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("aid", aid);
        params.put("name", name);
        params.put("mobile", mobile);
        if (!StringUtils.isEmpty(email)) {
            params.put("email", email);
        }
        if (!StringUtils.isEmpty(remark)) {
            params.put("remark", remark);
        }

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, ACTIVITY_APPLY, params, callback, HTTP_ACTIVITY_APPLY);
    }

    /**
     * 4.1.大师列表
     */
    public static final String ARTIST_INDEX = ROOT_URL + "Artist/index";
    public static final int HTTP_ARTIST_INDEX = 100041;

    public static void artistIndex(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ARTIST_INDEX, params, callback, HTTP_ARTIST_INDEX);
    }


    public static final String ARTIST_DETAILS = ROOT_URL + "Artist/details";
    public static final int HTTP_ARTIST_DETAILS = 100032;

    /**
     * 4.2大师详情
     *
     * @param mContext
     * @param callback
     * @param id       大师id
     */
    public static void artistDetails(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ARTIST_DETAILS, params, callback, HTTP_ARTIST_DETAILS);
    }

    /**
     * 4.3大师简介
     *
     * @param mContext
     * @param callback
     * @param id       大师id
     */
    public static final String ARTIST_DETAILS_ABSTRACT = ROOT_URL + "Artist/details_abstract&id=%1s&type=%2s";

    public static final String ARTIST_CHOICENESS = ROOT_URL + "Artist/choiceness";
    public static final int HTTP_ARTIST_CHOICENESS = 100044;

    /**
     * 4.4大师精选视频
     *
     * @param mContext
     * @param callback
     * @param id       大师id
     * @param page
     */
    public static void artistChoiceness(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ARTIST_CHOICENESS, params, callback, HTTP_ARTIST_CHOICENESS);
    }

    public static final String ARTIST_SUBSCRIPTION = ROOT_URL + "Artist/subscription";
    public static final int HTTP_ARTIST_SUBSCRIPTION = 100045;

    /**
     * 4.5订阅大师页面
     *
     * @param mContext
     * @param callback
     * @param id       大师id
     */
    public static void artistSubscription(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ARTIST_SUBSCRIPTION, params, callback, HTTP_ARTIST_SUBSCRIPTION);
    }

    public static final String ARTIST_NOBREAK = ROOT_URL + "Pub/footprint";
    public static final int HTTP_ARTIST_NOBREAK = 100046;

    /**
     * 4.6每日推荐
     *
     * @param mContext
     * @param callback
     */
    public static void artistNobreak(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ARTIST_NOBREAK, params, callback, HTTP_ARTIST_NOBREAK);
    }

    public static final String HANDPICK_VIDEO = ROOT_URL + "Handpick/video";
    public static final int HTTP_HANDPICK_VIDEO = 100051;

    /**
     * 5.1精选视频
     *
     * @param mContext
     * @param callback
     * @param type     1文化2 技术默认为文化
     */
    public static void handpickVideo(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("type", type);
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, HANDPICK_VIDEO, params, callback, HTTP_HANDPICK_VIDEO);
    }

    public static final String HANDPICK_VIDEO_DETAILS = ROOT_URL + "Video/details";
    public static final int HTTP_HANDPICK_VIDEO_DETAILS = 100052;

    /**
     * 5.2视频详情
     *
     * @param mContext
     * @param callback
     * @param id       视频id
     */
    public static void videoDetails(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, HANDPICK_VIDEO_DETAILS, params, callback, HTTP_HANDPICK_VIDEO_DETAILS);
    }

    public static final String HANDPICK_VIDEO_FANS = ROOT_URL + "Handpick/video_fans";
    public static final int HTTP_HANDPICK_VIDEO_FANS = 100053;

    /**
     * 5.3点赞视频与取消点赞
     *
     * @param mContext
     * @param callback
     * @param type     1点赞2 取消
     * @param id       视频id
     */
    public static void handpickVideoFans(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("type", type);
        params.put("id", id);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, HANDPICK_VIDEO_FANS, params, callback, HTTP_HANDPICK_VIDEO_FANS);
    }

    public static final String HANDPICK_LEAVE = ROOT_URL + "Video/comment";
    public static final int HTTP_HANDPICK_LEAVE = 100054;

    /**
     * 5.4视频全部评论
     *
     * @param mContext
     * @param callback
     * @param id       视频id
     * @param page
     */
    public static void handpicLeave(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("video_id", id);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, HANDPICK_LEAVE, params, callback, HTTP_HANDPICK_LEAVE);
    }

    public static final String HANDPICK_ADD_LEAVE = ROOT_URL + "Handpick/add_leave";
    public static final int HTTP_HANDPICK_ADD_LEAVE = 100055;

    /**
     * 5.5发表评论
     *
     * @param mContext
     * @param callback
     * @param id       视频id
     * @param content  评论内容
     */
    public static void handpicAddLeave(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id, String content) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);
        params.put("content", content);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, HANDPICK_ADD_LEAVE, params, callback, HTTP_HANDPICK_ADD_LEAVE);
    }

    public static final String HANDPICK_BOOKS_DETAILS = ROOT_URL + "Books/details";
    public static final int HTTP_HANDPICK_BOOKS_DETAILS = 100056;

    /**
     * 5.6图书详情
     *
     * @param mContext
     * @param callback
     * @param id       视频id
     */
    public static void handpicBookDetails(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, HANDPICK_BOOKS_DETAILS, params, callback, HTTP_HANDPICK_BOOKS_DETAILS);
    }

    /**
     * 5.7图书简介
     */
    public static final String HANDPICK_BOOKS_H5 = ROOT_URL + "Handpick/books_h5&id=%s";


    /**
     * 5.8 用户停止视频播放
     *
     * @param mContext
     * @param callback
     * @param id
     * 视频id
     * @param percent
     * 播放百分比
     */
    public static final String HANDPICK_VIDEO_PLAY = ROOT_URL + "handpick/user_plays";
    public static final int HTTP_HANDPICK_VIDEO_PLAY = 100058;

    /**
     *
     * @param mContext
     * @param callback
     * @param id
     * @param percent
     * @param time
     * 观看时间秒
     * @param type
     * 1 视频 2 图书
     * @param page
     * 读到了那一页 （type = 2时必传）
     */
    public static void videoPlaysPercent(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id, String percent,String time,String type,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("content_id", id);
        params.put("percent", percent);
        params.put("time", time);
        params.put("type", type);
        if("2".equals(type)){
            params.put("page", page );
        }

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, HANDPICK_VIDEO_PLAY, params, callback, HTTP_HANDPICK_VIDEO_PLAY);
    }

    public static final String CIRCLE_INDEX = ROOT_URL + "Circle/index";
    public static final int HTTP_CIRCLE_INDEX = 100061;
    public static final int HTTP_CIRCLE_INDEX1 = 100161;

    /**
     * 6.1圈子列表
     *
     * @param mContext
     * @param callback
     * @param type     1未加入（默认）2 已加入
     * @param page
     */
    public static void circleIndex(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("type", type);
        params.put("page", page);
        int index = HTTP_CIRCLE_INDEX;
        if ("2".equals(type)) {
            index = HTTP_CIRCLE_INDEX1;
        }
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_INDEX, params, callback, index);
    }

    public static final String CIRCLE_SEARCH = ROOT_URL + "Circle/search";
    public static final int HTTP_CIRCLE_SEARCH = 100062;

    /**
     * 6.2圈子搜索
     *
     * @param mContext
     * @param callback
     * @param search   搜索内容
     * @param page
     */
    public static void circleSearch(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String search, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("search", search);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_SEARCH, params, callback, HTTP_CIRCLE_SEARCH);
    }

    public static final String CIRCLE_MEMBER = ROOT_URL + "Circle/member";
    public static final int HTTP_CIRCLE_MEMBER = 100063;

    /**
     * 6.3圈子成员
     *
     * @param mContext
     * @param callback
     * @param search   搜索内容
     * @param page
     */
    public static void circleMember(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String search, String hx_id, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        if (!StringUtils.isEmpty(search)) {
            params.put("search", search);
        }
        params.put("hx_id", hx_id);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_MEMBER, params, callback, HTTP_CIRCLE_MEMBER);
    }

    public static final String CIRCLE_ADD_GROUP = ROOT_URL + "Circle/add_group";
    public static final int HTTP_CIRCLE_ADD_GROUP = 100064;

    /**
     * 6.4加入圈子
     *
     * @param mContext
     * @param callback
     * @param hx_id    圈子环信id
     */
    public static void addGroup(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String hx_id,String price,String cycle,String circle_id,String way) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("hx_id", hx_id);
        params.put("price", price);
        params.put("cycle", cycle);
        params.put("circle_id", circle_id);
        params.put("way", way);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, CIRCLE_ADD_GROUP, params, callback, HTTP_CIRCLE_ADD_GROUP);
    }

    public static final String CIRCLE_SECEDE = ROOT_URL + "Circle/secede";
    public static final int HTTP_CIRCLE_SECEDE = 100065;

    /**
     * 6.5退出圈子
     *
     * @param mContext
     * @param callback
     * @param hx_id    圈子环信id
     */
    public static void secede(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String hx_id,String circle_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("hx_id", hx_id);
        String userChatId = MyApplication.getInstance().sputil.getString(ConstantUserInfo.CHAT_LOGIN_ID);
        params.put("user_hx_id", userChatId);
        params.put("circle_id", circle_id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_SECEDE, params, callback, HTTP_CIRCLE_SECEDE);
    }

    public static final String CIRCLE_ADD_FRIEND = ROOT_URL + "Circle/add_friend";
    public static final int HTTP_CIRCLE_ADD_FRIEND = 100066;

    /**
     * 6.6发起好友申请
     *
     * @param mContext
     * @param callback
     * @param friend_id 圈子环信id
     */
    public static void addFriend(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String friend_id,String content) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("friend_id", friend_id);
        params.put("title", content);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, CIRCLE_ADD_FRIEND, params, callback, HTTP_CIRCLE_ADD_FRIEND);
    }

    public static final String LIVE_INDEX = ROOT_URL + "Live/index";
    public static final int HTTP_LIVE_INDEX = 100071;

    /**
     * 7.1 直播首页
     *
     * @param mContext
     * @param callback
     * @param page
     */
    public static void liveIndex(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, LIVE_INDEX, params, callback, HTTP_LIVE_INDEX);
    }

    public static final String LIVE_ORDER = ROOT_URL + "Live/order";
    public static final int HTTP_LIVE_ORDER = 100072;

    /**
     * 7.2直播预约
     *
     * @param mContext
     * @param callback
     * @param id       直播id
     */
    public static void liveOrder(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, LIVE_ORDER, params, callback, HTTP_LIVE_ORDER);
    }

    public static final String LIVE_DETAILS = ROOT_URL + "Live/details";
    public static final int HTTP_LIVE_DETAILS = 100073;

    /**
     * 7.3直播详情
     *
     * @param mContext
     * @param callback
     * @param id       直播id
     */
    public static void liveDetails(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, LIVE_DETAILS, params, callback, HTTP_LIVE_DETAILS);
    }

    public static final String LIVE_ADD_MESSAGE = ROOT_URL + "Live/add_message";
    public static final int HTTP_LIVE_ADD_MESSAGE = 100074;

    /**
     * 7.4直播发表留言
     *
     * @param mContext
     * @param callback
     * @param id       直播id
     */
    public static void liveAddMessage(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id, String content) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);
        params.put("content", content);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, LIVE_ADD_MESSAGE, params, callback, HTTP_LIVE_ADD_MESSAGE);
    }

    public static final String USER_INDEX = ROOT_URL + "User/index";
    public static final int HTTP_USER_INDEX = 100081;

    /**
     * 8.1个人中心首页
     *
     * @param mContext
     * @param callback
     */
    public static void userIndex(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_INDEX, params, callback, HTTP_USER_INDEX);
    }

    public static final String USER_VERSION = ROOT_URL + "User/version";
    public static final int HTTP_USER_VERSION = 100082;

    /**
     * 8.2版本更新
     *
     * @param mContext
     * @param callback
     */
    public static void userVersion(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_VERSION, params, callback, HTTP_USER_VERSION);
    }

    public static final String USER_MESSAGE = ROOT_URL + "User/message";
    public static final int HTTP_USER_MESSAGE = 100083;

    /**
     * 8.3我的信息
     *
     * @param mContext
     * @param callback
     */
    public static void userMessage(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_MESSAGE, params, callback, HTTP_USER_MESSAGE);
    }

    public static final String USER_ADD_FRIEND = ROOT_URL + "User/add_friend";
    public static final int HTTP_USER_ADD_FRIEND = 100084;
    public static final int HTTP_USER_ADD_FRIEND1 = 100841;

    /**
     * 8.4接受和不接受好友申请
     *
     * @param mContext
     * @param callback
     * @param form_id  好友id
     * @param type     1接受 2 不接受
     */
    public static void userAddFriend(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String form_id, String type) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("form_id", form_id);
        params.put("type", type);
        int index = HTTP_USER_ADD_FRIEND;

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_ADD_FRIEND, params, callback, index);
    }

    public static final String USER_USER_FRIEND = ROOT_URL + "User/user_friend";
    public static final int HTTP_USER_USER_FRIEND = 100085;

    /**
     * 8.5好友列表
     *
     * @param mContext
     * @param callback
     */
    public static void userFriend(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_USER_FRIEND, params, callback, HTTP_USER_USER_FRIEND);
    }

    public static final String USER_DEL_FRIEND = ROOT_URL + "User/del_friend";
    public static final int HTTP_USER_DEL_FRIEND = 100086;

    /**
     * 8.6删除好友
     *
     * @param mContext
     * @param callback
     */
    public static void delFriend(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String friend_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("friend_id", friend_id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_DEL_FRIEND, params, callback, HTTP_USER_DEL_FRIEND);
    }

    public static final String USER_MY_ACTIVITY = ROOT_URL + "User/my_activity";
    public static final int HTTP_USER_MY_ACTIVITY = 100087;

    /**
     * 8.7 我参与的活动
     *
     * @param mContext
     * @param callback
     */
    public static void myActivity(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_MY_ACTIVITY, params, callback, HTTP_USER_MY_ACTIVITY);
    }

    public static final String USER_BALANCE = ROOT_URL + "User/balance";
    public static final int HTTP_USER_BALANCE = 100088;

    /**
     * 8.8 我的余额
     *
     * @param mContext
     * @param callback
     */
    public static void userBalance(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_BALANCE, params, callback, HTTP_USER_BALANCE);
    }

    public static final String USER_CONSUME = ROOT_URL + "User/consume";
    public static final int HTTP_USER_CONSUME = 100089;

    /**
     * 8.9 我的消费记录
     *
     * @param mContext
     * @param callback
     */
    public static void userConsume(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_CONSUME, params, callback, HTTP_USER_CONSUME);
    }

    public static final String USER_DEL_CONSUME = ROOT_URL + "User/del_consume";
    public static final int HTTP_DEL_CONSUME = 100810;

    /**
     * 8.10 删除消费记录
     *
     * @param mContext
     * @param callback
     */
    public static void delConsume(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_DEL_CONSUME, params, callback, HTTP_DEL_CONSUME);
    }

    public static final String USER_INTEGRAL = ROOT_URL + "User/integral";
    public static final int HTTP_USER_INTEGRAL = 100811;

    /**
     * 8.11 我的积分
     *
     * @param mContext
     * @param callback
     */
    public static void userIntegral(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_INTEGRAL, params, callback, HTTP_USER_INTEGRAL);
    }

    public static final String USER_SHOPPING = ROOT_URL + "User/shopping";
    public static final int HTTP_USER_SHOPPING = 100812;

    /**
     * 8.12我的购物车
     *
     * @param mContext
     * @param callback
     */
    public static void userShopping(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_SHOPPING, params, callback, HTTP_USER_SHOPPING);
    }

    public static final String USER_DEL_SHOPPING = ROOT_URL + "Pub/del_footprint";
    public static final int HTTP_USER_DEL_SHOPPING = 100813;

    /**
     * 8.13删除购物车商品
     *
     * @param mContext
     * @param callback
     * @param id       购物车id
     */
    public static void delShopping(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id,String type) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);
        params.put("type", type);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, USER_DEL_SHOPPING, params, callback, HTTP_USER_DEL_SHOPPING);
    }

    public static final String USER_PRAISE = ROOT_URL + "User/praise";
    public static final int HTTP_USER_PRAISE = 100814;

    /**
     * 8.14我赞过的
     *
     * @param mContext
     * @param callback
     */
    public static void userPraise(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_PRAISE, params, callback, HTTP_USER_PRAISE);
    }

    public static final String USER_LEAVE = ROOT_URL + "User/leave";
    public static final int HTTP_USER_LEAVE = 100815;

    /**
     * 8.15我的评论
     *
     * @param mContext
     * @param callback
     */
    public static void userLeave(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_LEAVE, params, callback, HTTP_USER_LEAVE);
    }

    public static final String USER_MY_NUMBER = ROOT_URL + "User/my_number";
    public static final int HTTP_USER_MY_NUMBER = 100816;

    /**
     * 8.16我的账号
     *
     * @param mContext
     * @param callback
     */
    public static void myNumber(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_MY_NUMBER, params, callback, HTTP_USER_MY_NUMBER);
    }

    public static final String USER_EDIT_MOBILE = ROOT_URL + "User/edit_mobile";
    public static final int HTTP_USER_EDIT_MOBILE = 100817;

    /**
     * 8.17 修改手机号
     *
     * @param mContext
     * @param callback
     */
    public static void editMobile(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String mobile, String code, String type) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("code", code);
        params.put("type", type);
        params.put("mobile", mobile);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_EDIT_MOBILE, params, callback, HTTP_USER_EDIT_MOBILE);
    }

    public static final String USER_EDIT = ROOT_URL + "User/edit";
    public static final int HTTP_USER_EDIT = 100818;

    /**
     * 8.18 修改昵称 性别 学历 出生日期  行业  头像
     *
     * @param context
     * @param file      上传文件的本地路径
     * @param callBack
     * @param username  用户名
     * @param birthday  生日
     * @param education 学历
     * @param industry  行业
     * @param sex       性别1男2女3保密
     */
    public static void userEdit(final Context context, final AnsynHttpRequest.ObserverCallBack callBack, String signature,File file
            , String username, String birthday, String education, String industry, String sex) {

        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        if (!StringUtils.isEmpty(username)) {
            params.put("username", username);
        }
        if (!StringUtils.isEmpty(birthday)) {
            params.put("birthday", birthday);
        }
        if (!StringUtils.isEmpty(education)) {
            params.put("education", education);
        }
        if (!StringUtils.isEmpty(industry)) {
            params.put("industry", industry);
        }
        if (!StringUtils.isEmpty(sex)) {
            params.put("sex", sex);
        }
        if (!StringUtils.isEmpty(signature)) {
            params.put("signature", signature);
        }

        PostFormBuilder postFormBuilder = OkHttpUtils.post().url(USER_EDIT);
        if (file != null && file.exists()) {//用户头像
            postFormBuilder.addFile("userpic", file.getName(), file.getAbsoluteFile());
        }
        Log.e("Log", USER_EDIT + params.toString());
        postFormBuilder
                .params(params)
                .tag(context).build()
                .execute(new StringCallback() {
                    @Override
                    public void onError(Call call, Exception e, int id) {
                        callBack.handleResult(e.toString(), AnsynHttpRequest.FAILURE_HTTP,
                                HTTP_USER_EDIT);
                        Logger.e(e.toString());
                    }

                    @Override
                    public void onResponse(String response, int id) {
                        callBack.handleResult(response, AnsynHttpRequest.SUCCESS_HTTP,
                                HTTP_USER_EDIT);
                        Logger.e(response);
                    }
                });
    }

    public static final String USER_BUNDLE = ROOT_URL + "User/bundle";
    public static final int HTTP_USER_BUNDLE = 100819;

    /**
     * 8.19绑定手机
     *
     * @param mContext
     * @param callback type 1 微信2 qq  3 微博
     */
    public static void bindMobile(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type,String username, String userpic, String sid) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("type", type);
        params.put("username",username);
        params.put("userpic",userpic);
        params.put("sid",sid);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, USER_BUNDLE, params, callback, HTTP_USER_BUNDLE);
    }

    public static final String USER_UNBUNDLE = ROOT_URL + "User/unbundle";
    public static final int HTTP_USER_UNBUNDLE = 100820;

    /**
     * 8.20解绑微信 qq 微博
     *
     * @param mContext
     * @param callback type 2 微信 3 qq 4 微博
     */
    public static void unBundle(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("type", type);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_UNBUNDLE, params, callback, HTTP_USER_UNBUNDLE);
    }

    public static final String USER_EDIT_PASSWORD = ROOT_URL + "User/edit_password";
    public static final int HTTP_USER_EDIT_PASSWORD = 100821;

    /**
     * 8.21修改密码
     *
     * @param mContext
     * @param callback
     * @param mobile
     * @param code
     * @param password
     */
    public static void editPassword(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String mobile, String code, String password) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("code", code);
        params.put("mobile", mobile);
        params.put("password", password);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, USER_EDIT_PASSWORD, params, callback, HTTP_USER_EDIT_PASSWORD);
    }

    public static final String USER_FAQ = ROOT_URL + "user/FAQ";
    public static final int HTTP_USER_FAQ = 100822;

    /**
     * 8.22常见问题
     *
     * @param mContext
     * @param callback
     * @param page
     */
    public static void userFAQ(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_FAQ, params, callback, HTTP_USER_FAQ);
    }

    public static final String USER_FAQ_DETAILS = ROOT_URL + "user/FAQ_details";
    public static final int HTTP_USER_FAQ_DETAILS = 100823;

    /**
     * 8.23常见问题详情
     *
     * @param mContext
     * @param callback
     * @param id
     */
    public static void userFAQDetails(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_FAQ_DETAILS, params, callback, HTTP_USER_FAQ_DETAILS);
    }

    /**
     * 8.24关于我们
     */
    public static final String USER_ABOUT = ROOT_URL + "User/about";

    public static final String USER_DEL_MESSAGE = ROOT_URL + "User/del_message";
    public static final int HTTP_USER_DEL_MESSAGE = 100825;

    /**
     * 8.25删除系统信息
     *
     * @param mContext
     * @param callback
     * @param id       信息id
     */
    public static void delMessage(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_DEL_MESSAGE, params, callback, HTTP_USER_DEL_MESSAGE);
    }

    public static final String ORDER_INDEX = ROOT_URL + "order/index";
    public static final int HTTP_ORDER_INDEX = 100091;

    /**
     * 9.1我的订阅
     *
     * @param mContext
     * @param callback
     * @param type     1 视频 2 图书 3 大师
     */
    public static void orderIndex(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("type", type);
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ORDER_INDEX, params, callback, HTTP_ORDER_INDEX);
    }

    public static final String ORDER_ADD_SHOPPING = ROOT_URL + "Pub/add_shopping";
    public static final int HTTP_ORDER_ADD_SHOPPING = 100092;

    /**
     * 9.2	 视频/图书加购物车
     *
     * @param mContext
     * @param callback
     * @param type       1 视频 2 图书
     * @param content_id 视频/图书id
     */
    public static void addShopping(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type, String content_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("type", type);
        params.put("content_id", content_id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, ORDER_ADD_SHOPPING, params, callback, HTTP_ORDER_ADD_SHOPPING);
    }

    public static final String ORDER_ORDER_VIDEO = ROOT_URL + "Order/order";
    public static final int HTTP_ORDER_ORDER_VIDEO = 100093;

    /**
     * 9.3 购买图书/视频
     *
     * @param mContext
     * @param callback
     * @param type     1 视频 2 图书
     * @param id       视频/图书id
     * @param money    金额
     * @param way      1 余额 2 其他
     */
    public static void orderVideo(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type, String id, String money, String way,String is_integarl,String integral) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("type", type);
        params.put("id", id);
        params.put("money", money);
        params.put("way", way);
        params.put("is_integarl", is_integarl);
        params.put("integral", integral);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, ORDER_ORDER_VIDEO, params, callback, HTTP_ORDER_ORDER_VIDEO);
    }

    public static final String ORDER_ORDER_APP = ROOT_URL + "Order/order_app";
    public static final int HTTP_ORDER_ORDER_APP = 100094;

    /**
     * 9.4定购大师/APP
     *
     * @param mContext
     * @param callback
     * @param type     1 大师 2 App
     * @param artistId Type = 1 必传
     * @param money    金额
     * @param way      1 余额 2 其他
     * @param duration 1 一个月 2 一季度 3 一年
     */
    public static void orderApp(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String type, String artistId, String money, String way, String duration) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("type", type);
        if ("1".equals(type)) {
            params.put("artistId", artistId);
        }
        params.put("money", money);
        params.put("way", way);
        params.put("duration", duration);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, ORDER_ORDER_APP, params, callback, HTTP_ORDER_ORDER_APP);
    }

    public static final String ORDER_RECHARGE = ROOT_URL + "User/recharge";
    public static final int HTTP_ORDER_RECHARGE = 100095;

    /**
     * 9.5用户充值
     *
     * @param mContext
     * @param callback
     * @param money    金额
     */
    public static void orderRecharge(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String money) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("money", money);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, ORDER_RECHARGE, params, callback, HTTP_ORDER_RECHARGE);
    }

    public static final String ORDER_ORDER_SHOPPING = ROOT_URL + "Order/order_shopping";
    public static final int HTTP_ORDER_ORDER_SHOPPING = 100096;

    /**
     * 购物车结算
     * @param mContext
     * @param callback
     * @param id
     * 购物车id，多个商品逗号连接
     * @param way
     * 1 余额 2 其他
     * @param money
     * @param is_integarl
     * 1未使用 2 使用积分
     * @param integral
     * 积分
     */
    public static void orderShopping(Context mContext, AnsynHttpRequest.ObserverCallBack callback
            , String id, String way, String money,String is_integarl,String integral) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);
        params.put("way", way);
        params.put("money", money);
        params.put("is_integarl", is_integarl);
        params.put("integral", integral);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, ORDER_ORDER_SHOPPING, params, callback, HTTP_ORDER_ORDER_SHOPPING);
    }

    public static final String USER_FEEDBACK = ROOT_URL + "User/feedback";
    public static final int HTTP_USER_FEEDBACK = 100096;

    /**
     * 用户反馈
     *
     * @param mContext
     * @param callback
     * @param feedback
     */
    public static void feedback(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String feedback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("feedback", feedback);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_FEEDBACK, params, callback, HTTP_USER_FEEDBACK);
    }

    public static final String USER_IS_PUSH = ROOT_URL + "User/is_push";
    public static final int HTTP_USER_IS_PUSH = 100097;

    /**
     * 是否接受推送
     *
     * @param mContext
     * @param callback
     * @param is_push  1 推送 2不推送
     */
    public static void isPush(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String is_push) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("is_push", is_push);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_IS_PUSH, params, callback, HTTP_USER_IS_PUSH);
    }

    public static final String HANDPIC_BOOKS_READ = ROOT_URL + "Handpick/books_read";
    public static final int HTTP_HANDPIC_BOOKS_READ = 100098;

    /**
     * 是否接受推送
     *
     * @param mContext
     * @param callback
     * @param second   读书时长（秒）
     * @param id       图书id
     * @param page
     */
    public static void readLong(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String second, String id, String page, String percent) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("second", second);
        params.put("id", id);
        params.put("page", page);
        params.put("percent", percent);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, HANDPIC_BOOKS_READ, params, callback, HTTP_HANDPIC_BOOKS_READ);
    }

    public static final String USER_MESSAGE_STATE = ROOT_URL + "User/message_state";
    public static final int HTTP_USER_MESSAGE_STATE = 100099;

    /**
     * 设置消息已读
     *
     * @param mContext
     * @param callback
     */
    public static void messageState(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_MESSAGE_STATE, params, callback, HTTP_USER_MESSAGE_STATE);
    }

    public static final String USER_INDUSTRY = ROOT_URL + "User/industry";
    public static final int HTTP_USER_INDUSTRY = 100100;

    /**
     * 设置消息已读
     *
     * @param mContext
     * @param callback
     * 1学历2行业
     */
    public static void industry(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_INDUSTRY, params, callback, HTTP_USER_INDUSTRY);
    }

    public static final String INDEX_EXCHANGE = ROOT_URL + "Index/exchange";
    public static final int HTTP_INDEX_EXCHANGE = 100101;

    /**
     * 用户可兑换列表
     *
     * @param mContext
     * @param callback
     * @param integral
     */
    public static void exchangeInteral(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String integral) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        if(!StringUtils.isEmpty(uid)){
            HashMap<String, String> params = new HashMap<>();
            params.put("uid", uid);
            params.put("token", token);
            params.put("integral", integral);
            AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_EXCHANGE, params, callback, HTTP_INDEX_EXCHANGE);
        }
    }
    public static final String INDEX_ORDER = ROOT_URL + "Index/order";
    public static final int HTTP_INDEX_ORDER = 100102;
    /**
     * 预约公告列表
     *
     * @param mContext
     * @param callback
     * @param master_id
     */
    public static void indexOrder(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String master_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        if(!StringUtils.isEmpty(uid)){
            HashMap<String, String> params = new HashMap<>();
            params.put("uid", uid);
            params.put("token", token);
            params.put("master_id", master_id);
            AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_ORDER, params, callback, HTTP_INDEX_ORDER);
        }
    }

    /**
     * 热门 活动
     */
    public static final String INDEX_HOT_ACTIVITY = ROOT_URL + "Index/hot_activity";
    public static final String INDEX_ACTIVITY = ROOT_URL + "Activity/index";
    public static final int HTTP_INDEX_HOT_ACTIVITY = 100103;

    public static void hotAction(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page, String is_charge) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);
        String url  = null;
        if("3".equals(is_charge)){
            url = INDEX_HOT_ACTIVITY;
        }else{
            params.put("is_charge", is_charge);
            url = INDEX_ACTIVITY;
        }

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, url, params, callback, HTTP_INDEX_HOT_ACTIVITY);
    }

    /**
     * 热门课程
     */
    public static final String INDEX_HOT_CURRICULUM = ROOT_URL + "Index/hot_curriculum";
    public static final int HTTP_INDEX_HOT_CURRICULUM = 100104;

    public static void hotCurriculum(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_HOT_CURRICULUM, params, callback, HTTP_INDEX_HOT_CURRICULUM);
    }

    /**
     * 删除搜索记录
     */
    public static final String INDEX_DEL_SEARCH = ROOT_URL + "Index/del_search";
    public static final int HTTP_INDEX_DEL_SEARCH = 100105;

    public static void delSearch(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id, String type) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
            if(!StringUtils.isEmpty(id)){
                params.put("id", id);
            }
            params.put("type", type);

            AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_DEL_SEARCH, params, callback, HTTP_INDEX_DEL_SEARCH);
        }
    }

    /**
     * 图书分类
     */
    public static final String BOOKS_CLASSIFY = ROOT_URL + "Books/classify";
    public static final int HTTP_BOOKS_CLASSIFY = 100106;

    public static void booksClassify(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, BOOKS_CLASSIFY, params, callback, HTTP_BOOKS_CLASSIFY);

    }

    /**
     * 图书列表
     */
    public static final String BOOKS_BOOKS = ROOT_URL + "Books/books";
    public static final int HTTP_BOOKS_BOOKS = 100107;

    public static void booksBooks(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page, String classify_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);
        params.put("classify_id", classify_id);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, BOOKS_BOOKS, params, callback, HTTP_BOOKS_BOOKS);
    }

    /**
     * 老师列表
     */
    public static final String CURRICULUM_INDEX = ROOT_URL + "curriculum/referrer";
    public static final int HTTP_CURRICULUM_INDEX = 100108;

    public static void getCurriculum(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CURRICULUM_INDEX, params, callback, HTTP_CURRICULUM_INDEX);
    }

    /**
     * 老师列表
     */
    public static final String CURRICULUM_MASTER_DETAILS = ROOT_URL + "curriculum/master_details";
    public static final int HTTP_CURRICULUM_MASTER_DETAILS = 100109;

    public static void getCurriculumMasterDetail(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CURRICULUM_MASTER_DETAILS, params, callback, HTTP_CURRICULUM_MASTER_DETAILS);
    }

    /**
     * 大师详情获取课程
     */
    public static final String CURRICULUM_CURRICULUM = ROOT_URL + "curriculum/curriculum";
    public static final int HTTP_CURRICULUM_CURRICULUM = 100110;

    public static void getCurriculumCurriculum(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String masterId, String time) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", masterId);
        params.put("time", time);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CURRICULUM_CURRICULUM, params, callback, HTTP_CURRICULUM_CURRICULUM);
    }

    /**
     * 课程详情
     */
    public static final String CURRICULUM_DETAILS = ROOT_URL + "curriculum/details";
    public static final int HTTP_CURRICULUM_DETAILS = 100111;

    public static void curriculumDetails(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page, String courseId) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);
        params.put("id", courseId);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CURRICULUM_DETAILS, params, callback, HTTP_CURRICULUM_DETAILS);
    }

    /**
     * 三方登录前判断是否是老师
     */
    public static final String LOGIN_IS_MASTER = ROOT_URL + "Login/is_master";
    public static final int HTTP_LOGIN_IS_MASTER = 100112;

    public static void loginIsMaster(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String w_id, int type) {
        HashMap<String, String> params = new HashMap<>();
        params.put("w_id", w_id);
        params.put("type", String.valueOf(type-1));
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, LOGIN_IS_MASTER, params, callback, HTTP_LOGIN_IS_MASTER);
    }

    /**
     * 范儿曲库首页
     */
    public static final String KOJI_INDEX = ROOT_URL + "Koji/index";
    public static final int HTTP_KOJI_INDEX = 100113;

    public static void kojiIndex(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, KOJI_INDEX, params, callback, HTTP_KOJI_INDEX);
    }

    /**
     * 我喜欢
     */
    public static final String KOJI_LIKE = ROOT_URL + "Koji/like";
    public static final int HTTP_KOJI_LIKE = 100114;

    public static void kojiLike(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, KOJI_LIKE, params, callback, HTTP_KOJI_LIKE);
    }

    /**
     * 全部曲库
     */
    public static final String KOJI_WHOLE = ROOT_URL + "Koji/whole";
    public static final int HTTP_KOJI_WHOLE = 100115;

    public static void kojiWhole(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, KOJI_WHOLE, params, callback, HTTP_KOJI_WHOLE);
    }

    /**
     * 我唱的
     */
    public static final String KOJI_SING = ROOT_URL + "Koji/sing";
    public static final int HTTP_KOJI_SING = 100116;

    public static void kojiSing(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String uid,String token, String page) {
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        if (!StringUtils.isEmpty(token)) {
            params.put("token", token);
        }
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, KOJI_SING, params, callback, HTTP_KOJI_SING);
    }

    /**
     * 伴奏详情
     */
    public static final String KOJI_DETAILS = ROOT_URL + "Koji/details";
    public static final int HTTP_KOJI_DETAILS = 100117;

    public static void kojiDetails(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String page,String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", id);//曲目id
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, KOJI_DETAILS, params, callback, HTTP_KOJI_DETAILS);
    }

    /**
     * 创建圈子
     */
    public static final String ADD_CIRCLE = ROOT_URL + "Circle/add_circle";
    public static final int HTTP_ADD_CIRCLE = 100118;

    public static void addCircle(Context mContext,final AnsynHttpRequest.ObserverCallBack callback, String name,String describe,String max_fans,String price,String cycle,String owner,File file) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("name", name);
        params.put("max_fans", max_fans);
        params.put("price", price);
        params.put("cycle", cycle);
        params.put("describe", describe);
        params.put("owner", owner);
        PostFormBuilder postFormBuilder = OkHttpUtils.post().url(ADD_CIRCLE);
        if (file != null && file.exists()) {//用户头像
            postFormBuilder.addFile("imgs", file.getName(), file.getAbsoluteFile());
        }
        Log.e("Log", ADD_CIRCLE + params.toString());
        postFormBuilder
                .params(params)
                .tag(mContext).build()
                .execute(new StringCallback() {
                    @Override
                    public void onError(Call call, Exception e, int id) {
                        callback.handleResult(e.toString(), AnsynHttpRequest.FAILURE_HTTP,
                                HTTP_ADD_CIRCLE);
                        Logger.e(e.toString());
                    }

                    @Override
                    public void onResponse(String response, int id) {
                        callback.handleResult(response, AnsynHttpRequest.SUCCESS_HTTP,
                                HTTP_ADD_CIRCLE);
                        Logger.e(response);
                    }
                });
//        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ADD_CIRCLE, params, callback, HTTP_ADD_CIRCLE);
    }

    /**
     * 圈子详情
     */
    public static final String CIRCLE_DETAIL = ROOT_URL + "Circle/details";
    public static final int HTTP_CIRCLE_DETAIL = 100119;

    public static void circleDetail(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String circleId) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("id", circleId);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_DETAIL, params, callback, HTTP_CIRCLE_DETAIL);
    }

    /**
     * 成员详情
     */
    public static final String CIRCLE_DETAIL_MEMBER = ROOT_URL + "Circle/member_details";
    public static final int HTTP_CIRCLE_DETAIL_MEMBER = 100120;

    public static void circleDetailMember(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String memberId) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("friend_id", memberId);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_DETAIL_MEMBER, params, callback, HTTP_CIRCLE_DETAIL_MEMBER);
    }

    /**
     * 成员禁言
     */
    public static final String CIRCLE_AN_EXCUSE = ROOT_URL + "Circle/an_excuse";
    public static final int HTTP_CIRCLE_AN_EXCUSE = 100121;

    public static void circleAnExcuse(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String hx_id,String jin_id,String length_time) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("hx_id", hx_id);
        params.put("jin_id", jin_id);
        params.put("length_time", length_time);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_AN_EXCUSE, params, callback, HTTP_CIRCLE_AN_EXCUSE);
    }

    /**
     * 用户是否禁言
     */
    public static final String CIRCLE_IS_AN_EXCUSE = ROOT_URL + "Circle/is_an_excuse";
    public static final int HTTP_CIRCLE_IS_AN_EXCUSE = 100122;

    public static void circleIsAnExcuse(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String circle_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("circle_id", circle_id);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_IS_AN_EXCUSE, params, callback, HTTP_CIRCLE_IS_AN_EXCUSE);
    }

    /**
     * 修改缴费金额与费用时限,圈子名称，简介
     */
    public static final String CIRCLE_EDIT = ROOT_URL + "Circle/edit";
    public static final int HTTP_CIRCLE_EDIT = 100123;

    public static void circleEdit(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String hx_id,String name,String price,String cycle,String describe,String is_push) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("hx_id", hx_id);

        if(!StringUtils.isEmpty(name)){
            params.put("name", name);
        }
        if(!StringUtils.isEmpty(price)){
            params.put("price", price);
        }
        if(!StringUtils.isEmpty(cycle)){
            params.put("cycle", cycle);
        }
        if(!StringUtils.isEmpty(describe)){
            params.put("describe", describe);
        }
        if(!StringUtils.isEmpty(is_push)){
            params.put("is_push", is_push);
        }

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, CIRCLE_EDIT, params, callback, HTTP_CIRCLE_EDIT);
    }

    /**
     * 缴费明细
     */
    public static final String CIRCLE_CONSUMPTION = ROOT_URL + "Circle/circle_consumption";
    public static final int HTTP_CIRCLE_CONSUMPTION = 100123;

    public static void circleConsumption(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String circleChatId,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("hx_id", circleChatId);
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_CONSUMPTION, params, callback, HTTP_CIRCLE_CONSUMPTION);
    }

    /**
     * 添加取消收藏，喜欢，点赞
     */
    public static final String KOJI_USER_OPERATION = ROOT_URL + "Koji/user_operation";
    public static final int HTTP_KOJI_USER_OPERATION = 100124;

    /**
     * 添加取消收藏，喜欢，点赞
     * @param mContext
     * @param callback
     * @param koji_id
     * 曲目id（必传）
     * @param type
     * 1 添加 2 取消（必传，没有默认）
     * @param genre
     * 	1 收藏 2 喜欢 3 点赞（必传，没有默认）
     */
    public static void kojiUserOperation(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String koji_id,String type,String genre) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("koji_id", koji_id);
        params.put("type", type);
        params.put("genre", genre);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, KOJI_USER_OPERATION, params, callback, HTTP_KOJI_USER_OPERATION);
    }


    /**
     * 我唱的保存
     */
    public static final String KOJI_PRESERVATION = ROOT_URL + "Koji/preservation";
    public static final int HTTP_KOJI_PRESERVATION = 100125;

    public static void kojiPreservation(Context mContext,final AnsynHttpRequest.ObserverCallBack callback, String koji_id,String is_show,File mp3File,File fileImg) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("koji_id", koji_id);
        params.put("is_show", is_show);
        PostFormBuilder postFormBuilder = OkHttpUtils.post().url(KOJI_PRESERVATION);
        if (fileImg != null && fileImg.exists()) {//用户头像
            postFormBuilder.addFile("img", fileImg.getName(), fileImg.getAbsoluteFile());
        }
        if (mp3File != null && mp3File.exists()) {//用户头像
            postFormBuilder.addFile("mp3", mp3File.getName(), mp3File.getAbsoluteFile());
        }else{
            return;
        }
        Log.e("Log", KOJI_PRESERVATION + params.toString());
        postFormBuilder
                .params(params)
                .tag(mContext).build()
                .execute(new StringCallback() {
                    @Override
                    public void onError(Call call, Exception e, int id) {
                        callback.handleResult(e.toString(), AnsynHttpRequest.FAILURE_HTTP,
                                HTTP_KOJI_PRESERVATION);
                        Logger.e(e.toString());
                    }

                    @Override
                    public void onResponse(String response, int id) {
                        callback.handleResult(response, AnsynHttpRequest.SUCCESS_HTTP,
                                HTTP_KOJI_PRESERVATION);
                        Logger.e(response);
                    }
                });
//        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, ADD_CIRCLE, params, callback, HTTP_ADD_CIRCLE);
    }

    /**
     * 发布评论
     */
    public static final String KOJI_COMMENT = ROOT_URL + "Koji/comment";
    public static final int HTTP_KOJI_COMMENT= 100126;

    /**
     *
     * @param mContext
     * @param callback
     * @param content
     * 评论内容
     * @param content_id
     * 曲目/课程大师 id
     * @param type
     * 1 课程大师 2 伴奏
     */
    public static void kojiComment(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String content,String content_id,String type) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("content", content);
        params.put("content_id", content_id);
        params.put("type", type);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, KOJI_COMMENT, params, callback, HTTP_KOJI_COMMENT);
    }

    public static final String CIRCLE_DISSOLUTION = ROOT_URL + "Circle/dissolution";
    public static final int HTTP_CIRCLE_DISSOLUTION = 100127;

    /**
     * 解散圈子
     *
     * @param mContext
     * @param callback
     * @param hx_id    圈子环信id
     */
    public static void dissolution(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String hx_id,String circle_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("hx_id", hx_id);
        params.put("circle_id", circle_id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, CIRCLE_DISSOLUTION, params, callback, HTTP_CIRCLE_DISSOLUTION);
    }

    /**
     * 视频分类
     */
    public static final String VIDEO_CLASSIFY = ROOT_URL + "Video/classify";
    public static final int HTTP_VIDEO_CLASSIFY = 100128;

    public static void videoClassify(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, VIDEO_CLASSIFY, params, callback, HTTP_VIDEO_CLASSIFY);

    }

    public static final String VIDEO_LISTING = ROOT_URL + "Video/listing";
    public static final int HTTP_VIDEO_LISTING = 100129;

    /**
     * 视频列表
     * @param mContext
     * @param callback
     * @param classify_id
     * 分类id(默认第一个分类id)
     * @param artist_id
     * 大师id(可选)
     * @param page
     */
    public static void videoList(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String classify_id, String artist_id, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("classify_id", classify_id);
        params.put("artist_id", artist_id);
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, VIDEO_LISTING, params, callback, HTTP_VIDEO_LISTING);
    }

    public static final String PUB_FABULOUS = ROOT_URL + "Pub/fabulous";
    public static final int HTTP_PUB_FABULOUS = 100130;

    /**
     *
     * @param mContext
     * @param callback
     * @param content_id
     * 视频/图书 id
     * @param type
     * 1 添加 2 取消（必传，没有默认）
     * @param genre
     * 1 视频 2 图书（必传，没有默认）
     */
    public static void pubFabulous(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String content_id, String type, String genre) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("content_id", content_id);
        params.put("type", type);
        params.put("genre", genre);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, PUB_FABULOUS, params, callback, HTTP_PUB_FABULOUS);
    }

    public static final String PUB_SHARE = ROOT_URL + "Pub/share";
    public static final int HTTP_PUB_SHARE = 100131;

    /**
     * 分享图书/视频
     * @param mContext
     * @param callback
     * @param content_id
     * @param type
     * 1 图书 2 视频
     */
    public static void pubShare(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String content_id, String type) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        if(!StringUtils.isEmpty(uid)){
            HashMap<String, String> params = new HashMap<>();
            params.put("uid", uid);
            params.put("token", token);
            params.put("content_id", content_id);
            params.put("type", type);
            AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, PUB_SHARE, params, callback, HTTP_PUB_SHARE);
        }
    }

    public static final String CURRICULUM_APPOINTMENT = ROOT_URL + "curriculum/appointment";
    public static final int HTTP_CURRICULUM_APPOINTMENT = 100132;

    /**
     *
     * @param mContext
     * @param callback
     * @param curriculum_id
     * @param way
     * 支付方式 1余额 2支付宝 3微信
     * @param price
     */
    public static void appointment(Context mContext, AnsynHttpRequest.ObserverCallBack callback
            , String curriculum_id, String way,String price,String is_integarl,String integral) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("curriculum_id", curriculum_id);
        params.put("way", way );
        params.put("price", price );
        params.put("is_integral", is_integarl);
        if("2".equals(is_integarl)){
            params.put("integral", integral);
        }

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, CURRICULUM_APPOINTMENT, params, callback, HTTP_CURRICULUM_APPOINTMENT);
    }

    /**
     * 我的收藏
     */
    public static final String USER_COLLECTION = ROOT_URL + "User/collection";
    public static final int HTTP_USER_COLLECTION = 100133;

    public static void collection(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_COLLECTION, params, callback, HTTP_USER_COLLECTION);
    }

    /**
     * 用户提现
     */
    public static final String USER_WITHDRAWALS = ROOT_URL + "User/withdrawals";
    public static final int HTTP_USER_WITHDRAWALS = 100134;

    public static void withdrawals(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String bank,String card,String price,String mobile,String code) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("bank", bank);
        params.put("card", card);
        params.put("price", price);
        params.put("mobile", mobile );
        params.put("code", code);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, USER_WITHDRAWALS, params, callback, HTTP_USER_WITHDRAWALS);
    }

    /**
     * 抽奖记录
     */
    public static final String SHARE_TURN_DETAIL = ROOT_URL + "Share/turn_details";
    public static final int HTTP_SHARE_TURN_DETAIL = 100135;

    public static void turnDetails(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, SHARE_TURN_DETAIL, params, callback, HTTP_SHARE_TURN_DETAIL);
    }

    /**
     * 删除抽奖记录
     */
    public static final String SHARE_DEL_TURN = ROOT_URL + "Share/del_turn";
    public static final int HTTP_SHARE_DEL_TURN = 100136;

    public static void delTurn(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, SHARE_DEL_TURN, params, callback, HTTP_SHARE_DEL_TURN);
    }

    /**
     * 我的课程
     */
    public static final String USER_MY_CURRICULUM = ROOT_URL + "User/my_curriculum";
    public static final int HTTP_USER_MY_CURRICULUM = 100137;

    /**
     *
     * @param mContext
     * @param callback
     * @param state
     * 老师：1 即将开课 2 已预约 3 未预约 学生： 1 已预约 2 已完结
     */
    public static void myCurriculum(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String state,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("state", state);
        params.put("page", page);
        String identity = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_IDENTITY_TYPE);
        //1 用户 2 老师
        if("2".equals(identity)){
            String master_id = MyApplication.getInstance().sputil.getString(ConstantUserInfo.MASTER_ID);
            params.put("master_id", master_id);
        }
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_MY_CURRICULUM, params, callback, HTTP_USER_MY_CURRICULUM);
    }

    /**
     * 订阅导师
     */
    public static final String ARTIST_ARTIST_BUY = ROOT_URL + "Artist/artist_buy";
    public static final int HTTP_ARTIST_ARTIST_BUY = 100145;

    /**
     * 订阅导师
     * @param mContext
     * @param callback
     * @param artist_id
     * @param way
     * @param price_id
     * @param price
     * @param is_integral
     * @param integral
     */
    public static void artistBuy(Context mContext, AnsynHttpRequest.ObserverCallBack callback,
                                 String artist_id,String way,String price_id,String price,String is_integral,String integral) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("artist_id", artist_id);
        params.put("way", way);
        params.put("price_id", price_id);
        params.put("price", price);
        params.put("is_integral ", is_integral);
        params.put("integral", integral);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, ARTIST_ARTIST_BUY, params, callback, HTTP_ARTIST_ARTIST_BUY);
    }

    /**
     * 范儿币抵扣
     */
    public static final String PUB_USER_EXCHANGE = ROOT_URL + "Pub/user_exchange";
    public static final int HTTP_PUB_USER_EXCHANGE = 100138;

    /**
     * 订阅导师
     * @param mContext
     * @param callback
     * @param price
     */
    public static void userExchange(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String price) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("price", price);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, PUB_USER_EXCHANGE, params, callback, HTTP_PUB_USER_EXCHANGE);
    }

    /**
     * 转盘
     */
    public static final String SHARE_TURNTABLE = ROOT_URL + "Share/turntable&uid=%1s&token=%2s";
    public static String getTurntable(){
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        String url = String.format(SHARE_TURNTABLE,uid,token);
        return url;
    }

    public static final String USER_DEL_INTEGRAL = ROOT_URL + "User/del_integral";
    public static final int HTTP_USER_DEL_INTEGRAL = 100139;

    /**
     * 删除积分记录
     *
     * @param mContext
     * @param callback
     */
    public static void delIntegral(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("id", id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_DEL_INTEGRAL, params, callback, HTTP_USER_DEL_INTEGRAL);
    }

    public static final String USER_USERBUY_VIDEO = ROOT_URL + "User/userbuy_video";
    public static final int HTTP_USER_USERBUY_VIDEO = 100140;

    /**
     *  订阅的视频
     * @param mContext
     * @param callback
     * @param is_hide
     * @param page
     * @param search
     */
    public static void userbuyVideo(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String is_hide,String page,String search) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("is_hide", is_hide);
        params.put("page", page );
        params.put("search", search);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_USERBUY_VIDEO, params, callback, HTTP_USER_USERBUY_VIDEO);
    }

    public static final String USER_USERBUY_BOOKS = ROOT_URL + "User/userbuy_books";
    public static final int HTTP_USER_USERBUY_BOOKS = 100141;

    /**
     *  订阅的图书
     * @param mContext
     * @param callback
     * @param is_hide
     * @param page
     */
    public static void userbuyBooks(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String is_hide,String page,String search) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("is_hide", is_hide);
        params.put("page", page );
        params.put("search", search);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_USERBUY_BOOKS, params, callback, HTTP_USER_USERBUY_BOOKS);
    }

    public static final String USER_USERBUY_ARTIST = ROOT_URL + "User/userbuy_artist";
    public static final int HTTP_USER_USERBUY_ARTIST = 100142;
    /**
     *  订阅的图书
     * @param mContext
     * @param callback
     * @param search
     * @param page
     */
    public static void userbuyArtist(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String search ,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("search", search );
        params.put("page", page );

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, USER_USERBUY_ARTIST, params, callback, HTTP_USER_USERBUY_ARTIST);
    }

    public static final String INDEX_UPDATE_POSITION = ROOT_URL + "Index/update_position";
    public static final int HTTP_INDEX_UPDATE_POSITION = 100142;
    /**
     *  订阅的图书
     * @param mContext
     * @param callback
     * @param lng
     * 用户经度
     * @param lat
     * 用户纬度
     */
    public static void updatePosition(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String lng ,String lat) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("lng", lng);
        params.put("lat", lat );

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, INDEX_UPDATE_POSITION, params, callback, HTTP_INDEX_UPDATE_POSITION);
    }

    public static final String CIRCLE_PEOPLE_NEARBY = ROOT_URL + "Circle/people_nearby";
    public static final int HTTP_CIRCLE_PEOPLE_NEARBY = 100143;
    /**
     *  圈子附近的人
     * @param mContext
     * @param callback
     * @param page
     */
    public static void peopleNearby(Context mContext, AnsynHttpRequest.ObserverCallBack callback,String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("page", page );

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_PEOPLE_NEARBY, params, callback, HTTP_CIRCLE_PEOPLE_NEARBY);
    }

    /**
     * 曲库搜索
     */
    public static final String KOJI_KOJI_SEARCH = ROOT_URL + "Koji/koji_search";
    public static final int HTTP_KOJI_KOJI_SEARCH = 100144;

    public static void kojiSearch(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String search, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("search", search);
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, KOJI_KOJI_SEARCH, params, callback, HTTP_KOJI_KOJI_SEARCH);
    }

    /**
     * 一对一课程搜索
     */
    public static final String CURRICULUM_CURR_SEARCH = ROOT_URL + "curriculum/curr_search";
    public static final int HTTP_CURRICULUM_CURR_SEARCH = 100146;

    public static void curriculumSearch(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String search, String page) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = params = new HashMap<>();
        if (!StringUtils.isEmpty(uid)) {
            params.put("uid", uid);
            params.put("token", token);
        }
        params.put("search", search);
        params.put("page", page);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CURRICULUM_CURR_SEARCH, params, callback, HTTP_CURRICULUM_CURR_SEARCH);
    }

    /**
     * 举报理由
     */
    public static final String CIRCLE_REASON = ROOT_URL + "Circle/reason";
    public static final int HTTP_CIRCLE_REASON = 100147;

    public static void circleReason(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_REASON, null, callback, HTTP_CIRCLE_REASON);
    }

    /**
     * 举报
     */
    public static final String CIRCLE_REPORT = ROOT_URL + "Circle/report";
    public static final int HTTP_CIRCLE_REPORT = 100148;

    public static void circleReport(Context mContext,final AnsynHttpRequest.ObserverCallBack callback, String r_uid ,String reason_id,String circle_id,List<String> files) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("r_uid", r_uid );
        params.put("reason_id", reason_id );
        if(!StringUtils.isEmpty(circle_id)){
            params.put("circle_id", circle_id );
        }
        PostFormBuilder postFormBuilder = OkHttpUtils.post().url(CIRCLE_REPORT);

        for(int i=0;i<files.size();i++){
            if(StringUtils.isEmpty(files.get(i))){
                continue;
            }
            File filePath = new File(files.get(i));
            if (filePath != null && filePath.exists()) {//用户头像
                postFormBuilder.addFile("img["+i+"]", filePath.getName(), filePath.getAbsoluteFile());
            }
        }

        Log.e("Log", CIRCLE_REPORT + params.toString());
        postFormBuilder
                .params(params)
                .tag(mContext).build()
                .execute(new StringCallback() {
                    @Override
                    public void onError(Call call, Exception e, int id) {
                        callback.handleResult(e.toString(), AnsynHttpRequest.FAILURE_HTTP,
                                HTTP_CIRCLE_REPORT);
                        Logger.e(e.toString());
                    }

                    @Override
                    public void onResponse(String response, int id) {
                        callback.handleResult(response, AnsynHttpRequest.SUCCESS_HTTP,
                                HTTP_CIRCLE_REPORT);
                        Logger.e(response);
                    }
                });
    }

    /**
     * 删除所有范儿足迹
     */
    public static final String PUB_DELETE_ALL = ROOT_URL + "Pub/delete_all";
    public static final int HTTP_PUB_DELETE_ALL= 100149;

    public static void pubDelAll(Context mContext, AnsynHttpRequest.ObserverCallBack callback) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, PUB_DELETE_ALL, params, callback, HTTP_PUB_DELETE_ALL);
    }

    public static final String CIRCLE_IS_INVITING = ROOT_URL + "Circle/is_inviting";
    public static final int HTTP_CIRCLE_IS_INVITING = 100201;

    /**
     * 用户可以邀请的好友
     *
     * @param mContext
     * @param callback
     */
    public static void inviteFriend(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String circle_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("circle_id", circle_id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, CIRCLE_IS_INVITING, params, callback, HTTP_CIRCLE_IS_INVITING);
    }

    public static final String CIRCLE_INVITING = ROOT_URL + "Circle/inviting";
    public static final int HTTP_CIRCLE_INVITING = 100202;

    /**
     * 邀请好友加入圈子
     *
     * @param mContext
     * @param callback
     */
    public static void inviteFriendReq(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String circle_id,String friend_id) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("circle_id", circle_id);
        params.put("friend_id", friend_id);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.POST, CIRCLE_INVITING, params, callback, HTTP_CIRCLE_INVITING);
    }

    public static final String IS_CIRCLE = ROOT_URL + "User/is_circle";
    public static final int HTTP_IS_CIRCLE = 100203;

    /**
     * 同意或拒绝进入圈子
     * @param mContext
     * @param callback
     * @param form_id
     * 系统消息里
     * @param type
     * 系统消息里
     * @param content_id
     * 系统消息里
     * @param state
     * 1 同意 2 拒绝
     */
    public static void isCircle(Context mContext, AnsynHttpRequest.ObserverCallBack callback, String form_id, String type,String content_id,String state) {
        String uid = MyApplication.getInstance().sputil.getString(ConstantUserInfo.USER_ID);
        String token = MyApplication.getInstance().sputil.getString(ConstantUserInfo.TOKEN);
        HashMap<String, String> params = new HashMap<>();
        params.put("uid", uid);
        params.put("token", token);
        params.put("form_id", form_id);
        params.put("type", type);
        params.put("content_id", content_id);
        params.put("state", state);

        AnsynHttpRequest.requestGetOrPost(mContext, AnsynHttpRequest.GET, IS_CIRCLE, params, callback, HTTP_IS_CIRCLE);
    }

    /**
     * 我唱的音乐http://app.getfan.cn/index.php?s=Home/Share/userkoji&koji_id=241
     */
    public static final String SHARE_USERKOJI = ROOT_URL + "Share/userkoji&koji_id=%s";

    /**
     * 曲库详情
     * id是伴奏id
     */
    public static final String SHARE_KOJI = ROOT_URL + "Share/koji&id=%s";

    /**
     * 抽奖规则
     */
    public static final String SHARE_LUCK_RULE = ROOT_URL + "Share/luck_rule";
    /**
     * 视频分享连接
     */
    public static final String CIRCLE_AGREEMENT = ROOT_URL + "Circle/agreement";
    /**
     * 视频分享连接
     */
    public static final String SHARE_VIDEO = ROOT_URL + "share/video&id=%s";
    /**
     * 图书分享连接
     */
    public static final String SHARE_BOOK = ROOT_URL + "share/books&id=%s";
    /**
     * 直播分享连接
     */
    public static final String SHARE_LIVE = ROOT_URL + "share/live&id=%s";
    /**
     * 邀请码分享连接
     */
    public static final String SHARE_INVITE = ROOT_URL + "share/invite/id/%s";
    public static final String SHARE_IMAGE_URL = "http://qingchunguoxue.apptiming.com/Uploads/2017-07-07/595f58dfdfbfd.png";
}
